feat(go): Electron desktop app for workspace#340
Open
baryhuang wants to merge 7 commits intoopenagents-org:developfrom
Open
feat(go): Electron desktop app for workspace#340baryhuang wants to merge 7 commits intoopenagents-org:developfrom
baryhuang wants to merge 7 commits intoopenagents-org:developfrom
Conversation
|
@baryhuang is attempting to deploy a commit to the Raphael's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
checked in |
Contributor
|
@QuanCheng-QC Please do a thorough test |
Collaborator
Author
|
@zomux @QuanCheng-QC All commits are done. Ready for review and test. |
Clone workspace frontend into packages/go and wrap it as an Electron desktop app with: - Hidden titlebar with macOS traffic lights and window drag region - Loading screen with spinner animation - Custom app icon with rounded corners and macOS dock icon - Native menu bar (Edit, View, Window) - OAuth popup support for Google/GitHub auth - Auto-redirect to default workspace (configured via env vars) - electron-builder config for macOS/Windows/Linux packaging
- Add Electron settings persistence (electron/storage.js) with workspace history tracking (up to 10 entries) - Landing page shows workspace selector with URL input, up to 3 recent workspace chips with name + hover URL tooltip, and a dropdown of full history on the input field - Switch workspace via ⇄ button in sidebar header (saves current workspace name to history, navigates to selector with cancel option) - Auto-connect to last used workspace on launch - Support env var fallback (NEXT_PUBLIC_DEFAULT_WORKSPACE_*)
Replace non-square logo-icon.png with the 512x512 rounded app icon on the workspace selector page for consistent branding.
- Switch to static export (output: export) with unoptimized images - Replace standalone server with local HTTP server + SPA fallback (same pattern as ai-meeting-notes-agent desktop) - Handle all routing client-side in root page.tsx via window.location.pathname instead of Next.js dynamic routes - Add webSecurity: false to bypass CORS for workspace API calls from the local HTTP server origin - Update electron-builder to use extraResources for out/ directory
431f638 to
0996786
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
packages/go— Electron desktop wrapper around the workspace frontendHow to test
cd packages/go && npm installnpm run electron:dev— launches Electron with Next.js dev serverhttps://workspace.openagents.org/<id>?token=<token>) to connectnpm run build→ verify Next.js build succeedsHow to build and install
cd packages/go && npm version patch(currently0.1.0)npm run electron:buildpackages/go/dist/—.dmg(macOS),.exe(Windows),.AppImage(Linux).dmg, drag "OpenAgents Go" to Applications, launch from LaunchpadTechnical notes for reviewers
output: exportwithimages: { unoptimized: true }since the image optimizer requires a server. The[workspaceId]dynamic route is removed — routing is handled client-side inpage.tsxby readingwindow.location.pathname.ai-meeting-notes-agentdesktop). SPA fallback servesindex.htmlfor any unknown path, enabling client-side routing.webSecurity: falseis set on BrowserWindow because the workspace API (workspace-endpoint.openagents.org) does not allow requests fromhttp://127.0.0.1. This only affects the Electron app, not the web version.electron:devuses Next.js dev server onlocalhost:3001(full SSR, hot reload). Packaged app uses static export + local HTTP server. Both paths should be tested.userData/settings.json.storage.jsauto-maintains up to 10 history entries and updates workspace names on switch.